

MainHero = { __Name = 'MainHero' }

function MainHero.Get(id)

      local t = { Id = id }
      setmetatable(t,MainHero.MetaTable)
      return t
      
end

function MainHero.ConvertFrom(t)

      return MainHero.Get(t.Id)
end

function MainHero:sayHello()

      MainHeroServant4LuaCall(self.Id,0)
end

MainHero.__GetProperty = 
{
}

MainHero.__SetProperty = 
{
}

function MainHero.__GetByIndex(t,k)

      local pf = MainHero.__GetProperty[k]
      if pf ~= nil then
          return pf(t)
      end
      local f = MainHero.__Method[k]
      if f ~= nil then
          return f
      end
      return Object.__GetByIndex(t,k)
end

function MainHero.__SetByIndex(t,k,v)

      local pf = MainHero.__SetProperty[k]
      if pf ~= nil then
              pf(t,v)
            return
      end
      Object.__SetByIndex(t,k,v)
      return
end

MainHero.__Method = { 
          sayHello = MainHero.sayHello
}

MainHero.MetaTable = { __index = MainHero.__GetByIndex,__newindex = MainHero.__SetByIndex }
setmetatable(MainHero,MainHero.MetaTable)